import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    meta: { 
      cache:true
     },
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/search',
    name: 'Search',
    meta: { 
      cache:false
     },
    component: () => import(/* webpackChunkName: "about" */ '../views/Search.vue')
  },
  {
    path: '/videodetails',
    name: 'VideoDetails',
    meta: { 
      cache:false
     },
    component: () => import(/* webpackChunkName: "about" */ '../views/VideoDetails.vue')
  },
  {
    path: '/videodetailss',
    name: 'VideoDetails',
    component: () => import(/* webpackChunkName: "about" */ '../views/VideoDetails.vue')
  },
  {
    path: '/musicdetails',
    name: 'MusicDetails',
    meta: { 
      cache:false
     },
    component: () => import(/* webpackChunkName: "about" */ '../views/MusicDetails.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
